package Huihu.src.LQB;
/*
假设a,b,c,d,e代表0-9个不同的数字（不含有0），可以满足ab * cde =adb * ce
 */
public class 马虎的计算 {
    public static void main(String[] args) {
        int count=0;
        for (int a = 1; a < 10; a++) {
            for (int b = 1; b < 10; b++) {
                if (b!=a) for (int c = 1; c < 10; c++) {
                    if (c != b && c != a) for (int d = 1; d < 10; d++) {
                        if (d != a && d != b && d != c) for (int e = 1; e < 10; e++) {
                            if (e != a && e != b && e != c && e != d) {
                                if ((10 * a + b) * (100 * c + 10 * d + e) == (100 * a + 10 * d + b) * (10 * c + e)) {
                                    count++;
                                }
                            }
                        }
                    }
                }
            }
        }
        System.out.println(count);
    }
}
